package com.summer.bilibili.domain.provider;

import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.summer.bilibili.domain.system.ReportBehavior;
import com.summer.bilibili.form.OptionsProvider;
import com.summer.bilibili.model.Option;

import java.util.List;
import java.util.stream.Collectors;

/**
 * 举报行为
 */
public class ReportBehaviorProvider implements OptionsProvider {
    @Override
    public List< Option > getOptions() {
        return Db.list( ReportBehavior.class)
                .stream()
                .map(item -> new Option(item.getCategory(), item.getCategory()))
                .distinct()
                .collect(Collectors.toList());
    }
}
